home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / XLisp-Stat / Book / altlinkstack.lsp < prev    next >
Text File  |  1990-10-11  |  833b  |  23 lines

  1. ; book p.340
  2.  
  3. (require "data/stackloss")
  4. (require "functions/altlink")
  5.  
  6. (defproto stack-obs '(air temp conc loss) () observation-proto)
  7. (defmeth stack-obs :air () (slot-value 'air))
  8. (defmeth stack-obs :temp () (slot-value 'temp))
  9. (defmeth stack-obs :conc () (slot-value 'conc))
  10. (defmeth stack-obs :loss () (slot-value 'loss))
  11. (defmeth stack-obs :log-loss () (log (send self :loss)))
  12. (flet ((make-obs (air temp conc loss index)
  13.         (let ((label (format nil "~d" index)))
  14.           (send stack-obs :new
  15.                 :air air
  16.                 :temp temp
  17.                 :conc conc
  18.                 :loss loss
  19.                 :label label))))
  20.   (setf stack-list (mapcar #'make-obs air temp conc loss (iseq 0 20))))
  21. (plot-observations stack-list '(:air :log-loss))
  22. (plot-observations (select stack-list (iseq 11 20)) '(:temp :conc))
  23.